﻿Imports Clases
Public Class frmBorrarProductos

    Private Sub btnAceptar_Click(sender As System.Object, e As System.EventArgs) Handles btnAceptar.Click
        If txtNombre.Text = "" Then
            Me.ErrorProvider1.SetError(txtNombre, "Introduzca un nombre")
        Else
            Me.ErrorProvider1.SetError(txtNombre, "")
            Dim msg As String = miGestion.Borrar(txtNombre.Text)
            If msg <> "" Then
                MessageBox.Show(msg, "Atención")
            Else
                frmCajaRegistradora.cargarBotones()
                'frmCajaRegistradora.frmCajaRegistradora_Load(New Object, New EventArgs) -> Recarga
            End If
            txtNombre.Text = ""
        End If
    End Sub

    Private Sub btnVolver_Click(sender As System.Object, e As System.EventArgs) Handles btnVolver.Click
        Me.Close()
    End Sub
End Class